import React from 'react';
import { render } from 'react-dom';
import { Provider } from 'react-redux';
import { Router, browserHistory } from 'react-router';

import configureStore from './store';
import routes from './routes';
import reducers from './reducers';

require("./css/app.less");

const store = configureStore(reducers, __INITIAL_STATE__);

//middleware.listenForReplays(store)
const rootElement = document.getElementById('root');
render(
    <Provider store={store}>
        <Router history={browserHistory}>
            {routes(store.getState())}
        </Router>
    </Provider>,
    rootElement
);